<?php

/**
 * ViewRaidPlayers filter form base class.
 *
 * @package    raidpoints
 * @subpackage filter
 * @author     David Driscoll
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseViewRaidPlayersFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'altid'              => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'name'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'fullname'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'guildedflag'        => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'created_by'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'updated_by'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'classid'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'genderid'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raceid'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'rankid'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'talentid'           => new sfWidgetFormFilterInput(),
      'talentindex'        => new sfWidgetFormFilterInput(),
      'talentname'         => new sfWidgetFormFilterInput(),
      'talentactive'       => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'talentmainspec'     => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'talenttankspec'     => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'talentgroup'        => new sfWidgetFormFilterInput(),
      'talentspec'         => new sfWidgetFormFilterInput(),
      'talenturl'          => new sfWidgetFormFilterInput(),
      'pclass'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'gender'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'race'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'rank'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'altrank'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'ranksort'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raidid'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raidname'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raidslug'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raidserver'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'raidvisible'        => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'points'             => new sfWidgetFormFilterInput(),
      'lifetime'           => new sfWidgetFormFilterInput(),
      'decay'              => new sfWidgetFormFilterInput(),
      'normalize'          => new sfWidgetFormFilterInput(),
      'lifetimeattendance' => new sfWidgetFormFilterInput(),
      '30day'              => new sfWidgetFormFilterInput(),
      '60day'              => new sfWidgetFormFilterInput(),
      '90day'              => new sfWidgetFormFilterInput(),
      '120day'             => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'altid'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'name'               => new sfValidatorPass(array('required' => false)),
      'fullname'           => new sfValidatorPass(array('required' => false)),
      'guildedflag'        => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'created_by'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'updated_by'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'classid'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'genderid'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'raceid'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'rankid'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'talentid'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'talentindex'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'talentname'         => new sfValidatorPass(array('required' => false)),
      'talentactive'       => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'talentmainspec'     => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'talenttankspec'     => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'talentgroup'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'talentspec'         => new sfValidatorPass(array('required' => false)),
      'talenturl'          => new sfValidatorPass(array('required' => false)),
      'pclass'             => new sfValidatorPass(array('required' => false)),
      'gender'             => new sfValidatorPass(array('required' => false)),
      'race'               => new sfValidatorPass(array('required' => false)),
      'rank'               => new sfValidatorPass(array('required' => false)),
      'altrank'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'ranksort'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'raidid'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'raidname'           => new sfValidatorPass(array('required' => false)),
      'raidslug'           => new sfValidatorPass(array('required' => false)),
      'raidserver'         => new sfValidatorPass(array('required' => false)),
      'raidvisible'        => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'points'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'lifetime'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'decay'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'normalize'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'lifetimeattendance' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      '30day'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      '60day'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      '90day'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      '120day'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
    ));

    $this->widgetSchema->setNameFormat('view_raid_players_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ViewRaidPlayers';
  }

  public function getFields()
  {
    return array(
      'id'                 => 'Number',
      'altid'              => 'Number',
      'name'               => 'Text',
      'fullname'           => 'Text',
      'guildedflag'        => 'Boolean',
      'created_by'         => 'Number',
      'updated_by'         => 'Number',
      'classid'            => 'Number',
      'genderid'           => 'Number',
      'raceid'             => 'Number',
      'rankid'             => 'Number',
      'talentid'           => 'Number',
      'talentindex'        => 'Number',
      'talentname'         => 'Text',
      'talentactive'       => 'Boolean',
      'talentmainspec'     => 'Boolean',
      'talenttankspec'     => 'Boolean',
      'talentgroup'        => 'Number',
      'talentspec'         => 'Text',
      'talenturl'          => 'Text',
      'pclass'             => 'Text',
      'gender'             => 'Text',
      'race'               => 'Text',
      'rank'               => 'Text',
      'altrank'            => 'Number',
      'ranksort'           => 'Number',
      'raidid'             => 'Number',
      'raid'               => 'Text',
      'raidname'           => 'Text',
      'raidslug'           => 'Text',
      'raidserver'         => 'Text',
      'raidvisible'        => 'Boolean',
      'points'             => 'Number',
      'lifetime'           => 'Number',
      'decay'              => 'Number',
      'normalize'          => 'Number',
      'lifetimeattendance' => 'Number',
      '30day'              => 'Number',
      '60day'              => 'Number',
      '90day'              => 'Number',
      '120day'             => 'Number',
    );
  }
}
